<div class="list">
    <table>
        <thead>
        <tr>

            <g:sortableColumn property="id" title="${message(code:'product.table.id')}"/>

            <g:sortableColumn property="currentCost" title="${message(code:'product.table.currentCost')}"/>

            <g:sortableColumn property="currentPrice" title="${message(code:'product.table.currentPrice')}"/>

            <g:sortableColumn property="name" title="${message(code:'product.table.name')}"/>

            <g:sortableColumn property="productCategory" title="${message(code:'product.table.category')}"/>

        </tr>
        </thead>
        <tbody>
        <g:each in="${productInstanceList}" status="i" var="productInstance">
            <tr class="${(i % 2) == 0 ? 'odd' : 'even'}">

                <td><g:link action="show" id="${productInstance.id}">${fieldValue(bean: productInstance, field: 'id')}</g:link></td>

                <td>${fieldValue(bean: productInstance, field: 'currentCost')}</td>

                <td>${fieldValue(bean: productInstance, field: 'currentPrice')}</td>

                <td>${fieldValue(bean: productInstance, field: 'name')}</td>

                <td>${fieldValue(bean: productInstance, field: 'productCategory')}</td>

            </tr>
        </g:each>
        </tbody>
    </table>
</div>
<div class="paginateButtons">
    <g:paginate total="${Product.count()}"/>
</div>